<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>
<body>
  <div id="app">
    <p>购物车</p>
    <p>商品名称：{{name}}</p>
    <p>商品价格：{{price}}</p>
    <p>商品数量：<input type="text" v-model="num"></p>
    <p>总价：￥{{num * price}}元</p>
  </div>
  <script src="../vue.js"></script>
  <script>
    let vm = new Vue({
      el: '#app',
      data: {
        name: '大盘鸡',
        price: '39',
        num: 1
      }
    })
  </script>
</body>
</html>